From 4b6d488ea0780e72009dc42839c1d5e6dc5944e5 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sat, 4 Jun 2005 17:45:49 +0000 Subject: [PATCH] bitkeeper revision 1.1671 (42a1e8cdI_f9OiPqscVnjrOWWEVTmw) Add a manual 'sync_console' boot parameter that forces synchronous console output. May be useful for systems that crash unexpectedly and lose the last chunk of console output. Signed-off-by: Keir Fraser --- docs/src/user.tex | 7 +++++++ xen/drivers/char/console.c | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/src/user.tex b/docs/src/user.tex index 37fe19abb6..ccaf71b21e 100644 --- a/docs/src/user.tex +++ b/docs/src/user.tex @@ -1729,6 +1729,13 @@ editing \path{grub.conf}. transmitted/received character. [NB. Default for this option is `com1,vga'] +\item [sync\_console ] + Force synchronous console output. This is useful if you system fails + unexpectedly before it has sent all available output to the + console. In most cases Xen will automatically enter synchronous mode + when an exceptional event occurs, but this option provides a manual + fallback. + \item [conswitch=$<$switch-char$><$auto-switch-char$>$ ] Specify how to switch serial-console input between Xen and DOM0. The required sequence is CTRL-$<$switch-char$>$ diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 7d7cafeaf5..db80be7983 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -24,17 +24,21 @@ #include #include -/* opt_console: comma-separated list of console outputs. */ +/* console: comma-separated list of console outputs. */ static char opt_console[30] = OPT_CONSOLE_STR; string_param("console", opt_console); -/* opt_conswitch: a character pair controlling console switching. */ +/* conswitch: a character pair controlling console switching. */ /* Char 1: CTRL+ is used to switch console input between Xen and DOM0 */ /* Char 2: If this character is 'x', then do not auto-switch to DOM0 when it */ /* boots. Any other value, or omitting the char, enables auto-switch */ static unsigned char opt_conswitch[5] = "a"; string_param("conswitch", opt_conswitch); +/* sync_console: force synchronous console output (useful for debugging). */ +static int opt_sync_console; +boolean_param("sync_console", opt_sync_console); + static int xpos, ypos; static unsigned char *video; @@ -437,6 +441,12 @@ void init_console(void) XEN_COMPILER, XEN_COMPILE_DATE); printk(" Latest ChangeSet: %s\n\n", XEN_CHANGESET); set_printk_prefix("(XEN) "); + + if ( opt_sync_console ) + { + serial_start_sync(sercon_handle); + printk("Console output is synchronous.\n"); + } } void console_endboot(int disable_vga) -- 2.30.2